#include"process.h"

void ProcessOn(){
    const char style[S_NUM] = {'-','.','#','>','+'}; 
    char bar[NUM];
    int cnt = 0;
    const char* lable ="|\\-/";
    memset(bar,'\0',sizeof(bar));
    while(cnt<=100){
        //printf("[%-100s][%3d%%][%c]\r",bar,cnt,lable[cnt%4]);
        printf("\033[42;34m[%-100s][%3d%%][%c]\033[0m\r",bar,cnt,lable[cnt%4]);
        
        bar[cnt++] = style[N];
        fflush(stdout);
        //sleep(1);
        usleep(5e4);
    }
    printf("\n");
}
